<?php
declare(strict_types=1);

namespace Api;

use App\AiPro\Service\AiproCategoryService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Hyperf\HttpServer\Annotation\PostMapping;
use Hyperf\View\RenderInterface;
use Mine\MineApi;

#[Controller(prefix: 'aipro')]
class AiProController extends MineApi
{

    #[Inject]
    protected AiproCategoryService $categoryService;

    /**
     * 首页
     **/
    #[GetMapping('index')]
    public function index(RenderInterface $render)
    {
        //侧边栏列表
        $cate_list = $this->categoryService->getTreeList(['status' => 1]);
        return $render->render('aipro/index', [
            'cate_list' => $cate_list,
            'test' => 'testttt'
        ]);
    }

}